import{
  BASE_URL
} from './urls.js'
export const request = (params)=>{
  return new Promise(function(resolve,reject){
    wx.request({
      ...params,
      url:BASE_URL+params.url,
      success:(res)=>{
        resolve(res.data.message)
      },
      fail:(err)=>{
        reject(err)
      },
      complete:()=>{}
    })
  })
}